package com.ngsky.ana.index;

import javax.swing.*;
import java.awt.*;
import java.util.List;

import static com.ngsky.ana.conf.AppConstants.*;

/**
 * @Author syx
 * @Desc
 * @Create 2020/6/14 14:59
 */
public class ImageList extends JPanel {
    public ImageList(List<ImageItem> itemList) {
        if (null != itemList && itemList.size() > 0) {
            setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
            setPreferredSize(new Dimension(WINDOW_W, itemList.size()/3 * 305));

            for (ImageItem item : itemList) {
                add(item);
            }
        }
    }
}
